<?php
/**
 * 配音接口
 */
require_once dirname(dirname(__DIR__))."/common.php";
use app\cls\tom\Response;
use app\cls\tom\SysResource;
use app\model\UserMaterial;
//接收参数
if(empty($_REQUEST['video_uuid'])){
    Response::output(-1,"缺少参数");
}
$video_uuid=$_REQUEST['video_uuid'];
//实例化数据库
$db = SysResource::getDB(false);
$UserMaterial = new UserMaterial($db);
//先去查询是否有排序的数据
$da1=$UserMaterial->dub_detail($video_uuid);
//if(!empty($da1['video_lines'])){
//    $da1['video_lines']=json_decode($da1['video_lines'],true);
//    Response::output(0,"查询成功",$da1);
//}else{
//    $da2=[];
//    Response::output(0,"查询成功",$da1);
//}

if(!empty($da1)){
    if(!empty($da1['video_lines'])){
        $da1['video_lines']=json_decode($da1['video_lines'],true);
    }
    if(empty($da1['video_share_pic'])){
        $da1['share_pic']="";
    }else{
        $da1['share_pic']=$da1['video_share_pic'];
    }
    Response::output(0,"查询成功",$da1);
}else{
    Response::output(0,"查询成功",[]);
}
